package com.knife.file.domain.entity;

import com.knife.common.entity.BaseDto;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotBlank;

/**
 * @author xianzhi.chen@hand-china.com
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class KnifeStorageConfig extends BaseDto {

    public static final String FIELD_STORAGE_CONFIG_ID = "storageConfigId";
    public static final String FIELD_STORAGE_TYPE = "storageType";
    public static final String FIELD_DOMAIN = "domain";
    public static final String FIELD_END_POINT = "endPoint";
    public static final String FIELD_ACCESS_KEY_ID = "accessKeyId";
    public static final String FIELD_ACCESS_KEY_SECRET = "accessKeySecret";
    public static final String FIELD_APP_ID = "appId";
    public static final String FIELD_REGION = "region";
    public static final String FIELD_DEFAULT_FLAG = "defaultFlag";
    public static final String FIELD_TENANT_ID = "tenantId";
    public static final String FIELD_ACCESS_CONTROL = "accessControl";
    public static final String FIELD_BUCKET_PREFIX = "bucketPrefix";
    public static final String FIELD_STORAGE_CODE = "storageCode";
    public static final String FIELD_PREFIX_STRATEGY = "prefixStrategy";
    public static final String FIELD_CREATE_BUCKET_FLAG = "createBucketFlag";

    private Long id;

    /**
     * 存储类型 1:阿里 2:华为 3:Minio 4:腾讯 5:七牛 6:本地 7:京东云 8:AWS 9:百度云
     */
    private Integer storageType;
    /**
     * 绑定域名
     */
    private String domain;

    /**
     * 存储编码
     */
    private String storageCode;

    /**
     * EndPoint
     */
    private String endPoint;
    /**
     * AccessKeyId
     */
    private String accessKeyId;
    /**
     * AccessKeySecret
     */
    private String accessKeySecret;
    /**
     * 腾讯云AppId
     */
    private Integer appId;
    /**
     * 腾讯云COS所属地区
     */
    private String region;
    /**
     * 默认标识，0:不启用，1:启用
     */
    private Integer defaultFlag;
    /**
     * 租户ID
     */
    private Long tenantId;

    /**
     * bucket权限控制
     */
    private String accessControl;

    /**
     * bucket前缀
     */
    private String bucketPrefix;

    /**
     * 文件名前缀策略
     */
    private String prefixStrategy;

    /**
     * 自动创建bucket，0:不启用，1:启用
     */
    private Integer createBucketFlag;
}
